package com.ibeeking.found.cop.service.common.enums;

public enum WxCpFriendSoruceEnum {
    FROM_NO_KNOW(0, "未知来源"),
    FROM_QR_CODE(1, "扫描二维码"),
    FROM_SEARCH_MOBILE(2, "搜索手机号"),
    FROM_SHARE_CARD(3, "名片分享"),
    FROM_GROUP_CHAT(4, "群聊"),
    FROM_MOBILE_CONTACT_LIST(5, "手机通讯录"),
    FROM_WECHAT_CONTACT_LIST(6, "微信联系人"),
    FROM_TP_APP(8, "安装第三方应用时自动添加的客服人员"),
    FROM_SEARCH_EMAIL(9, "搜索邮箱"),
    FROM_VIEDIO(10, "视频号添加"),
    FROM_CALENDAR_ATTENDER(11, "通过日程参与人添加"),
    FROM_MEETING_ATTENDER(12, "通过会议参与人添加"),
    FROM_CP_FRIEND(13, "添加微信好友对应的企业微信"),
    FROM_CS_HARDWARE(14, "通过智慧硬件专属客服添加"),
    FROM_CS_ONDOOR(15, "通过上门服务客服添加"),
    FROM_LINK_TOUCH(16, "通过获客链接添加"),
    FROM_SHARE_INNER(201, "内部成员共享"),
    FROM_ADMIN_ASSIGN(202, "管理员/负责人分配"),
    ;
    private Integer code;
    private String desc;

    WxCpFriendSoruceEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByCode(Integer code) {
        for (WxCpFriendSoruceEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getDesc();
            }
        }
        return null;
    }
}
